package edu.infomatik.tundra.data;

import java.util.Calendar;
import java.util.Date;

import edu.infomatik.tundra.logic.WorkBean;
import edu.infomatik.tundra.logic.WorkKinds;

public class MockWorkBean implements IMockedBean<WorkBean>{
	private WorkBean mocked;
	
	MockWorkBean(String name, WorkKinds kind, int idealSP, int estSP, Date dateCreated, Date scheduleDate, Date deadline,
			     boolean inProgress, boolean fullEntered){
		mocked = new WorkBean();
		mocked.setName(name);
		mocked.setKind(kind);
		mocked.setIdealSP(idealSP);
		mocked.setEstSP(estSP);
		mocked.setDateCreated(dateCreated);
		mocked.setScheduleDate(scheduleDate);
		mocked.setDeadline(deadline);
		mocked.setInProgress(inProgress);
		mocked.setFullEntered(fullEntered);
	}
	
	@SuppressWarnings("unused")
	private MockWorkBean() {}
	
	@SuppressWarnings("deprecation")
	public static MockTundraData getMockedDataFactory(){
		MockTundraData result = new MockTundraData();
		result.update(new MockWorkBean("Lakiranje brodskog poda", WorkKinds.PROJECT, 100, 170, 
			   							new Date(110, Calendar.JULY, 2),new Date(110, Calendar.AUGUST, 2),new Date(110, Calendar.AUGUST, 10),
			   							false,true));
		result.update(new MockWorkBean("Hoblovanje", WorkKinds.OTHER, 10, 20, 
			   							new Date(110, Calendar.JULY, 2),new Date(110, Calendar.AUGUST, 2),new Date(110, Calendar.AUGUST, 2),
			   							false,false));
		result.update(new MockWorkBean("Proucavanje Tapestry 5 frameworka", WorkKinds.SPRINT, 130, 200, 
			   							new Date(110, Calendar.JULY, 2),new Date(110, Calendar.AUGUST, 1),new Date(110, Calendar.AUGUST, 10),
			   							true,false));
		result.update(new MockWorkBean("Fitness rejuvination", WorkKinds.PROJECT, 3, 10, new Date(109, Calendar.JULY, 25),
										new Date(110, Calendar.AUGUST, 1),new Date(111, Calendar.AUGUST, 2),true,true));
		result.update(new MockWorkBean("Tundra", WorkKinds.PROJECT, 800, 1300, 
										new Date(109, Calendar.OCTOBER, 15),new Date(110, Calendar.OCTOBER, 2),new Date(110, Calendar.OCTOBER, 1),
										true,true));
		return result;
	}

	@Override
	public WorkBean getMocked() {
		return mocked;
	}
	
	public long getId() {
		return mocked.getId();
	}
	public void setId(long id) {
		mocked.setId(id);
	}
	public String getName() {
		return mocked.getName();
	}
	public void setName(String name) {
		mocked.setName(name);
	}
	public short getKind() {
		return mocked.getKind();
	}
	public void setKind(WorkKinds kind) {
		mocked.setKind(kind);
	}
	public double getIdealSP() {
		return mocked.getIdealSP();
	}
	public void setIdealSP(double idealSP) {
		mocked.setIdealSP(idealSP);
	}
	public double getEstSP() {
		return mocked.getEstSP();
	}
	public void setEstSP(double estSP) {
		mocked.setEstSP(estSP);
	}
	public Date getDateCreaed() {
		return mocked.getDateCreated();
	}
	public void setDateCreaed(Date dateCreaed) {
		mocked.setDateCreated(dateCreaed);
	}
	public Date getScheduleDate() {
		return mocked.getScheduleDate();
	}
	public void setScheduleDate(Date scheduleDate) {
		mocked.setScheduleDate(scheduleDate);
	}
	public boolean isInProgress() {
		return mocked.isInProgress();
	}
	public void setInProgress(boolean inProgress) {
		mocked.setInProgress(inProgress);
	}
	public boolean isFullEntered() {
		return mocked.isFullEntered();
	}
	public void setFullEntered(boolean fullEntered) {
		mocked.setFullEntered(fullEntered);
	}
}
